From: Florian Müllner Date: Fri, 20 Sep 2019 00:50:36 +0000 (+0200) Subject: environment: Try harder to find a transition X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~811^2^2~33 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b6754d7db7f4522c336158fafe6f469fc8263b1b;p=gnome-shell.git environment: Try harder to find a transition When easing, we need the transition of one of the involved properties to connect our callbacks. Currently we simply get the transition for the first property, however as Clutter optimizes the case where a property doesn't actually change, that transition may be NULL even though we still animate other properties. So instead of only looking at the transition of the first property, try to find a transition for any of the involved properties. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1572 --- diff --git a/js/ui/environment.js b/js/ui/environment.js index 1f9420035..38d1d281a 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -121,7 +121,9 @@ function _easeActor(actor, params) { actor.set(params); actor.restore_easing_state(); - let transition = actor.get_transition(animatedProps[0]); + let transition = animatedProps.map(p => actor.get_transition(p)) + .find(t => t !== null); + if (transition) transition.connect('stopped', (t, finished) => callback(finished)); else